import 'dart:math';

import 'package:flutter/cupertino.dart';
import 'package:view_lamp/custom/light_string_preview.dart';


class PreviewContainer extends StatelessWidget{
  final Animation<Lamps> animation;
  final double viewWidth;
  final double viewHeight;


  PreviewContainer(this.animation, this.viewWidth, this.viewHeight);

  @override
  Widget build(BuildContext context) {

//    ViewLampItem(17, 72, Colors.transparent, 'assets/images/previewbulb1-x17y72.png'),
//    ViewLampItem(82, 90, Colors.transparent, 'assets/images/previewbulb2-x82y90.png'),
//    ViewLampItem(147, 104, Colors.transparent, 'assets/images/previewbulb3-x147y104.png'),
//    ViewLampItem(213, 106, Colors.transparent, 'assets/images/previewbulb4-x213y106.png'),
//    ViewLampItem(279, 101, Colors.transparent, 'assets/images/previewbulb5-x279y101.png'),
//    ViewLampItem(344, 90, Colors.transparent, 'assets/images/previewbulb6-x344y90.png'),
//    ViewLampItem(409, 73, Colors.transparent, 'assets/images/previewbulb7-x409y73.png'),
//    ViewLampItem(474, 60, Colors.transparent, 'assets/images/previewbulb8-x474y60.png'),
//    ViewLampItem(540, 60, Colors.transparent, 'assets/images/previewbulb9-x540y60.png'),
//    ViewLampItem(606, 70, Colors.transparent, 'assets/images/previewbulb10-x606y70.png'),
//    ViewLampItem(670, 87, Colors.transparent, 'assets/images/previewbulb11-x670y87.png'),
//    ViewLampItem(736, 102, Colors.transparent, 'assets/images/previewbulb12-x736y102.png'),


    return Stack(children: [
      Container(
        width: viewWidth,
        height: viewHeight,
        child: Image.asset(
          "assets/images/previewbulb.png",
        ),
      ),
      Container(
        width: viewWidth,
        height: viewHeight,
        child: Stack(
          children: [
            Positioned(
              left: 17 / 800 * viewWidth,
              top: 72 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[0],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 82 / 800 * viewWidth,
              top: 90 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[1],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 147 / 800 * viewWidth,
              top: 104 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[2],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 213 / 800 * viewWidth,
              top: 106 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[3],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 279 / 800 * viewWidth,
              top: 101 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[4],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 344 / 800 * viewWidth,
              top: 90 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[5],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 409 / 800 * viewWidth,
              top: 73 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[6],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 474 / 800 * viewWidth,
              top: 60 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[7],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 540 / 800 * viewWidth,
              top: 60 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[8],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 606 / 800 * viewWidth,
              top: 70 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[9],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 670 / 800 * viewWidth,
              top: 87 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[10],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
            Positioned(
              left: 736 / 800 * viewWidth,
              top: 102 / 200 * viewHeight,
              child: Image.asset(
                'assets/images/previewbulb1-x17y72.png',
                color: animation.value.lampColors[11],
                width: (33 / 800) * viewWidth,
                height: (47 / 200) * viewHeight,
              ),
            ),
          ],
        ),
      ),
    ],);
  }
}
